<template>
	<el-card class="main2">
		<div slot="header">
			<span>系统设置/班级管理</span>
		</div>
		<data-table size="small" :columnAttributes="columnAttributes" :tableAttribute="tableAttribute" :formObj="form" path="banji/" :rules="rules" pageable>
			<template v-slot:form>
				<el-form-item label="班级名称" :label-width="labelWidth" prop="name">
					<el-input v-model="form.name" auto-complete="off"></el-input>
				</el-form-item>
				<el-form-item label="班主任" :label-width="labelWidth" prop="manager">
					<el-input v-model="form.manager" auto-complete="off"></el-input>
				</el-form-item>				
			</template>
		</data-table>
	</el-card>
</template>

<script>
	import dataTable from '../components/dataTable.vue'
	export default {
		components:{dataTable},
		data() {
			return {
				columnAttributes:[
					{prop:'id',label:'序号'},
					{prop:'name',label:'班级名称'},
					{prop:'manager',label:'班主任'}
				],
				tableAttribute:{
					border:true
				},
				form:{
					id:'',
					name:'',
					manager:''
				},
				rules:{
					name:[{required:true,message:'班级名称必填',trigger:'blur'}],
					manager:[{required:true,message:'班主任必填',trigger:'blur'}]
				},
				labelWidth:'100px'
			}
		},
	}
</script>

<style scoped>
	.main2 {
		height: calc(100% - 5px);
	}
</style>
